package com.lqk.path;

import java.nio.file.Path;
import java.nio.file.Paths;

public class PathDemo1 {
    public static void main(String[] args) {
        // 创建path实例，绝对路径
        Path path = Paths.get("f:\\lqk\\01.txt");

        // 创建相对路径
        Paths.get("f:\\lqk","01.txt");

        String originalPath = "d:\\atguigu\\projects\\..\\yygh-project";
        Path path1 = Paths.get(originalPath);
        System.out.println("path1 = " + path1);
        Path path2 = path1.normalize();
        System.out.println("path2 = " + path2);

    }
}
